package com.onesports.intelligent.k12.polarlight.domain.dto.common;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 分页查询DTO
 * @author suyq
 * @date 2022/2/9 16:59
 */
@Data
public class BasePageDTO {
    private static final long serialVersionUID = 1L;

    @NotNull(message = "当前页不能为空")
    @Min(value = 0L, message = "当前页必须大于或等于0")
    @ApiModelProperty(value = "当前页", required = true, dataType = "long")
    private long page;

    @NotNull(message = "显示条数不能为空")
    @Min(value = 1L, message = "显示条数必须大于或等于1")
    @ApiModelProperty(value = "显示条数", required = true, dataType = "long")
    private long row;


    @Override
    public String toString() {
        return "PagingQueryDTO{" +
                "page=" + page +
                ", row=" + row +
                '}';
    }
}
